home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Communication / BIGSURF Netguide 3.3 / 03-1-GhostScript < prev    next >
Text File  |  1995-10-06  |  16KB  |  384 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Mac Ghostscript Postscript Viewer And Interpreter</TITLE>
  4. </HEAD>
  5. <BODY BACKGROUND=BACKGRND.JPG><HR>
  6. <CENTER><H1>Mac Ghostscript Postscript Viewer And Interpreter</H1></CENTER>
  7. <HR>
  8. <CENTER><H3>Informational Supplement To The BIGSURF Netguide</H3></CENTER>
  9. <HR>
  10. <CENTER><B>Mac GS Viewer (A port of Aladdin Ghostscript to the Macintosh)</B></CENTER><BR>
  11. <CENTER><A HREF="ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/mac">ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/mac</A></CENTER>
  12. <HR>
  13. <CENTER>Ghostscript by L. Peter Deutsch<BR>
  14. Mac GS Viewer & Macintosh drivers by Mark Lentczner</CENTER><BR>
  15. <BR>
  16. <CENTER><B>Very Quick Introduction to Ghostscript</B></CENTER>
  17. <P>
  18. Ghostscript is a PostScript interpreter.  PostScript is a language, not
  19. a graphic file format. A PostScript file is really a program, not
  20. graphical data. The difference is that by looking at a PostScript file
  21. you (or an application) cannot easily tell what the file represents. 
  22. Instead, you must run the file to see what it does.  Generally, the
  23. result of running a PostScript program is to draw marks on a graphical
  24. page.  (There are PostScript programs that don't draw anything at all! 
  25.  Some are even distributed as test files with Ghostscript.)  This works
  26. well for printers but is a bit odd for interactive window systems.
  27. <P>
  28. Think of Mac GS Viewer as a virtual printer: Every time you open a
  29. file, asking Ghostscript to run it as a PostScript program, the
  30. application creates a new sheet of 'paper' and displays it in a window.
  31.  You can see the program execute as it places marks on the 'paper' in
  32. the window (unless your computer is much faster than mine!). Once the
  33. program is done, the page is 'ejected' from the printer. However, the
  34. application leaves the window on the screen so you can continue to look
  35. at it (and scroll it, save it, etc.). But remember, at this point, the
  36. page is out of the printer and Ghostscript can no longer change it. If
  37. you want to change some parameter (such as scaling), you must change
  38. the parameter and then re-open, and thus re-run, the PostScript file.
  39. <P>
  40. Please see the file 'readme' and the files that end in '.doc' in the
  41. 'files' folder for more information.<BR>
  42. <HR><BR>
  43. <CENTER><B>Unpacking</B></CENTER>
  44.  
  45. <P>
  46. The release consists of the following files:
  47.  
  48. <UL>
  49. <LI>macgs-v1.0-files.sit  - Ghostscript files and documentation
  50. <LI>macgs-v1.0-68k.sit    - the application compiled for 68020 or better
  51. <LI>macgs-v1.0-ppc.sit    - the application compiled for PPC machines
  52. <LI>macgs-v1.0-fonts.sit  - the standard Ghostscript 3.0 fonts
  53. <li>macgs-v1.0-src.sit    - the source files
  54. </UL>
  55.  
  56. <P>
  57. These files are StuffIt archives. If you do not have a program to
  58. expand these, you should get the free StuffIt Expander program from
  59. your favorite Macintosh archive.
  60.  
  61. <P>
  62. [ 1 ] Unstuff macgs-v1.0-files.sit. It will create a folder named
  63. Ghostscript on your disk.
  64.  
  65. <P>
  66. [ 2 ] Unstuff one of the two application files, macgs-v1.0-68k.sit or
  67. macgs-v1.0-ppc.sit into the Ghostscript folder.  Remember to only
  68. unstuff one of them! The Finder gets confused if you have more than
  69. one version of an application on a disk.
  70.  
  71. <P>
  72. [ 3 ] Unstuff macgs-v1.0-fonts.sit into the Ghostscript folder as well.
  73. This is exactly the same collection of fonts as:
  74. ghostscript-fonts-std-3.0.tar.gz  it's just in a format most Macintosh
  75. users can handle.
  76.  
  77. <P>
  78. You will only need macgs-v1.0-src.sit if you are planning on compiling
  79. the program yourself. See the chapter "Building It" for more details.
  80. <HR>
  81.  
  82. <CENTER><B>Starting out</B></CENTER>
  83.  
  84. <P>
  85. Launch the application. By default, it will show you the Ghostscript
  86. console window, where you can see messages to and from Ghostscript. 
  87. After a few seconds, all initialization will be done and you will see
  88. the 'GS>' prompt in the console window. You don't actually have to
  89. wait for the prompt to begin using the program, anything that needs to
  90. wait for the prompt will do so automatically if you do it too early.
  91. <HR>
  92.  
  93. <CENTER><B>Getting Help</B></CENTER>
  94.  
  95. <P>
  96. The program makes extensive use of Balloon Help. Turn it on and
  97. explore!
  98. <HR>
  99.  
  100. <B><CENTER>Rendering a PostScript File</CENTER></B>
  101.  
  102. <P>
  103. Choosing 'Open' from the 'File' menu lets you choose any TEXT or EPSF
  104. file. When you open a file this way, a new window is created, it is
  105. presented to Ghostscript for interpretation. This (usually) results in
  106. rendering the first page of the file into the window.
  107.  
  108. <P>
  109. If there are more pages in the file, you will see a small alert box
  110. with two buttons: 'Next Page' and 'Interrupt'. Clicking the first will
  111. clear the window and let Ghostscript continue on with the next page in
  112. the file.  Clicking the second asks Ghostscript to cancel processing
  113. the rest of the file.
  114.  
  115. <P>
  116. Once a file has been rendered, it stays on the screen. You can resize,
  117. scroll it, save it (as a PICT file), copy it (to the clipboard). You
  118. can have as many windows open as memory allows.
  119. <HR>
  120.  
  121. <CENTER><B>Settings</B></CENTER>
  122.  
  123. <P>
  124. You can change the settings of output media with the "Settings" dialog.
  125. Open this dialog by choosing "Settings..." from the "Edit" menu. 
  126. There are three major sections:
  127.  
  128. <P>
  129. Page Size lets you set the size of the 'logical' page. This is the
  130. size that the PostScript file works with.
  131.  
  132. <P>
  133. Scaling lets you enlarge or reduce the 'logical' page to produce the
  134. actual output you see. This scaling happens conceptually after the
  135. page is printed.  However, Ghostscript is aware of this final scaling
  136. and will adjust some parameters accordingly (such as halftone screen,
  137. or any other parameters that are in 'device coordinates').
  138.  
  139. <P>
  140. Image Options let you select options that pertain to how the image is
  141. rendered and recorded.
  142.  
  143. <P>
  144. For example, if you want to render a document that was designed for a
  145. Letter size paper, but you want the output to be reduced to half size,
  146. then choose "US Letter" for the Page Size and "Half" for the Scaling.
  147.  
  148. <P>
  149. There are too many controls and options in this dialog to discuss here:
  150. Turn on balloon help and explore it!
  151.  
  152. <P>
  153. The options apply to all devices (see below), except Image Options
  154. which only apply to the 'mac' device.
  155. <HR>
  156.  
  157. <CENTER><B>Using Mac GS Viewer as a Web Helper Application</B></CENTER>
  158.  
  159. <P>
  160. You can use Mac GS Viewer as a helper application for your web browser. 
  161. The following steps show how to configure the Netscape browser. If you
  162. are using a different browser, the configuration will be similar:
  163.  
  164. <P>
  165. [1] In the Preferences section called Helper Applications, check to
  166. see if there is a Mime type application/postscript. If there isn't,
  167. then click New... and create one: In the dialog that appears, set the
  168. type to application, and the subtype to postscript, then click OK.
  169.  
  170. <P>
  171. [2] Select the application/postscript Mime type by clicking on it.
  172.  
  173. <P>
  174. [3] Set the extensions by typing ai,eps,ps into the Extensions field.
  175.  
  176. <P>
  177. [4] Set the application by clicking the Browse... button. In the
  178. dialog that appears, choose the Mac GS Viewer application and click OK.
  179.  Then choose the File type TEXT from the pop-up menu.
  180.  
  181. <P>
  182. [5] Set the action to Launch Application.
  183.  
  184. <P>
  185. [6] Click OK in the Preferences window to save the changes.
  186.  
  187. <P>
  188. Some browsers, though not Netscape, may need to be restarted before the
  189. change will take effect.
  190.  
  191. <P>
  192. IMPORTANT: Postscript includes operators for manipluating files. A
  193. buggy or malicious postscript file could damage the files on your
  194. harddisk.  To minimize this risk, you should start Mac GS Viewer and
  195. set the command line in the Preferences to:
  196. <P>
  197. -dSAFER
  198.  
  199. <P>
  200. This disable a number of file operations in Ghostscript.  Note that
  201. there are two problems with this: (a) This option does not claim to be
  202. fool proof - Postscript is very powerful and this option can't guard
  203. against all possible problems.  (b) You will be unable to render to any
  204. of the file devices when this is set. However, you still be able to
  205. save what you render to the screen as PICT files.
  206.  
  207. <P>
  208. To turn off this feature, you need to remove -dSAFER from the command
  209. line in the Preferences dialog, then quit and restart Mac GS Viewer.
  210. <HR>
  211.  
  212. <CENTER><B>Rendering to a File</B></CENTER>
  213.  
  214. <P>
  215. Ghostscript supports a large number of graphic output formats. 
  216. Ghostscript calls these devices. When your copy of the Macintosh port
  217. of Ghostscript was built, some devices were chosen to be included. 
  218. Since there are over a hundred devices, generally not all were
  219. included.  When you run the application, the devices that are included
  220. are listed in the 'Devices' menu.  The first one is always 'mac', which
  221. is the device for rendering into a Macintosh window.
  222.  
  223. <P>
  224. To use another device, and cause Ghostscript to render into a graphic
  225. file, choose the device from the Device menu, and then open the file as
  226. normal. This time, instead of a new window appearing, you will be
  227. asked to named a file to hold the output. The settings dialog can be
  228. used to set the page size and scaling options. Note that the image
  229. options have no effect on other devices. To switch back to rendering
  230. into a window, just choose 'mac' from the 'Devices' menu.
  231. <HR>
  232.  
  233. <CENTER><B>Stopping the Application</B></CENTER>
  234. <P>
  235. You can attempt to interrupt Ghostscript from whatever it is doing with
  236. the command-period key sequence (it is also available as 'Interrupt'
  237. in the 'Ghostscript' menu).  Interrupting a PostScript program is
  238. inherently unpredictable. This is because a PostScript file can trap
  239. the user-interrupt and refuse to stop!  Interrupt is implemented so
  240. that it should work smoothly in most cases, but you can't be sure. If
  241. it doesn't work, hit it a few more times.
  242.  
  243. <P>
  244. Similarly, Quit is also something that a PostScript program can refuse
  245. to do!  Sometimes, Ghostscript may not appear not to quit.  Always give
  246. it a few seconds to try.  If it just won't quit, the work around is to
  247. type: option-command-escape (all at once) to invoke the System 7
  248. Forced Quit dialog.
  249. <HR>
  250.  
  251. <CENTER><B>About Rendering</B></CENTER>
  252.  
  253. <P>
  254. Ghostscript interprets PostScript programs and renders the graphics
  255. that they output. The resulting output image is invariably device
  256. dependent. Indeed, the original PostScript file is the device
  257. independent form of the image.
  258.  
  259. <P>
  260. Even though the images that Ghostscript renders can be saved in PICT
  261. files or on the clipboard in PICT format, these are still device
  262. dependent versions of the image: they will not scale well, nor will
  263. they display well with different numbers of available colors. These
  264. PICT images are simply pixel graphics, not object-oriented graphics. 
  265. (If you examine these PICT files in a graphics program, you will notice
  266. that they are just a single large pixel map.)
  267.  
  268. <P>
  269. The Macintosh device currently renders to any of the following
  270. characteristics (which you control in the Settings dialog): 72 dpi 1,
  271. 4, or 8 bits per pixel standard Macintosh palettes for 4-bit gray, or
  272. 8-bit color
  273.  
  274. <P>
  275. These choices must be made at the time Ghostscript renders an image so
  276. that Ghostscript can do its best.  For example, Ghostscript will use
  277. halftone screens to achieve colors not in the palette.
  278.  
  279. <P>
  280. Though the scaling options may change the dpi from the point of view of
  281. the PostScript program, the resulting image on the screen (obviously,
  282. as we can't change your hardware on the fly!) and as saved in a PICT
  283. file, is 72dpi.  For example: If you choose a scaling option of a
  284. "Third", the PostScript program appears to render on a 24dpi device, as
  285. 24 pixels make up an inch. On the screen, however, 24 pixels make up a
  286. third of an inch at 72dpi, thus achieving the 'Third' scaling factor.
  287.  
  288. <P>
  289. The standard Macintosh 8-bit palette is a color cube of 6x6x6 values in
  290. RGB space. In addition, it adds evenly spaced ramps of 16 values each
  291. of red, green, blue, and gray. Using this palette allows Ghostscript
  292. to render with out having the change the palette of a normal 8-bit
  293. display system.
  294. <HR>
  295.  
  296. <CENTER><B>Preferences</B></CENTER>
  297.  
  298. <P>
  299. There are a number of application settings that can be set with
  300. "Preferences" dialog. Open this dialog by choosing "Preferences..."
  301. from the "File" menu. There are three major sections:
  302.  
  303. <P>
  304. Command Line lets you choose what the command line is for starting
  305. Ghostscript. Generally leaving it empty is fine. You can also choose
  306. to have the program ask you each time the program starts.
  307.  
  308. <P>
  309. Windows and Dialogs let you set which windows are shown at start up,
  310. and how to handle the Next Page condition. You can choose to have
  311. either a sound play or a small dialog appear, or both, when Ghostscript
  312. is waiting to display another page.
  313.  
  314. <P>
  315. Remember lets you choose what information is remembered from one
  316. invocation of the application to the next.
  317. <HR>
  318.  
  319. <CENTER><B>Command Line</B></CENTER>
  320.  
  321. <P>
  322. By default, Ghostscript is started with a blank command line.  This can
  323. be changed in two ways. First, you can set the command line in the
  324. preferences.  Second, you can set the preferences to ask you each time
  325. the application starts. In this mode, when you start the program, you
  326. will see a prompt for command line options in the console window.
  327.  
  328. <P>
  329. Almost everything that can be set on a command line can be set after
  330. Ghostscript is running either through the Settings dialog, or by typing
  331. into the console window.  However, there are few command line options
  332. that can be useful: 
  333. <P>
  334. -v   prints version information and then quits
  335. -?   prints help information and then quits -dDEBUG turns on debugging during initialization Do not set either of the first two as part of a default command line in the Preferences dialog, or each time you start it, Mac GS will display the information and quit.
  336. <HR>
  337.  
  338. <CENTER><B>Coming Enhancements</B></CENTER>
  339.  
  340. <P>
  341. Features for future releases that I'm considering (these are in no
  342. particular order):
  343.  
  344. <UL>
  345. <LI>Handling of Macintosh installed Type 1 Fonts
  346. <LI>Using QuickDraw to render TrueType fonts
  347. <LI>Better handling of file include search path
  348. <LI>Printing (by sending the PostScript source)
  349. <LI>Printing (by sending the GS rendered version)
  350. <LI>Parse DSC comments & Offer a Page menu
  351. <LI>Offer Page menu on PDF files
  352. <LI>Scrolling the image via the HyperCard/MacPaint hand user interface
  353. <LI>Console scroll back
  354. <LI>Console cut & paste and text file read & write
  355. <LI>Drivers and plug-in resources (would need support in GS)
  356. <LI>'nn' style user interface for multi-page documents
  357. <LI>Page settings as a 'windoid' palette
  358. <LI>Better dialog box look and layout for all dialogs
  359. <LI>Option key on Open AppleEvent to mean ask for settings first
  360. <LI>Rotation and Cropping as device settings
  361. <LI>AppleEvents for controling settings and sending PostScript
  362. <LI>Command files (non-rendering script files)
  363. <li>Mac device image options: 8bit gray scale and 4bit & 24bit color
  364. </UL>
  365. <HR>
  366. <B><CENTER>Ghostscript's Public FTP Site<CENTER></B><BR>
  367. <CENTER><A HREF="ftp://ftp.cs.wisc.edu/pub/ghost">ftp.cs.wisc.edu/pub/ghost</A></CENTER>
  368. <HR>
  369. <CENTER><B>Information On Ghostscript</B></CENTER><BR>
  370. <CENTER><A HREF="http://www.cs.wisc.edu/~ghost/index.html">http://www.cs.wisc.edu/~ghost/index.html</A></CENTER>
  371. <HR>
  372. <CENTER><B>Aladdin Systems</B></CENTER><BR>
  373. <CENTER><A HREF="mailto:ghost@aladdin.com">mailto:ghost@aladdin.com</A></CENTER>
  374. <HR>
  375. <CENTER><B>Glyphic Technology</B></CENTER><BR>
  376. <CENTER><A HREF="mailto:mac-gs@glyphic.com">mailto:mac-gs@glyphic.com</A></CENTER><BR>
  377. <CENTER><A HREF="http://www.webcom.com/~glyphic/">http://www.webcom.com/~glyphic/</A></CENTER><BR>
  378. <CENTER><A HREF="http://www.glyphic.com/">http://www.glyphic.com/</A></CENTER>
  379. <HR>
  380. <HR>
  381. <CENTER><A HREF=00-Table_Of_Contents><IMG SRC=TABLEOFC.GIF></A> <H3>Click To Return To The Table Of Contents.</H3></CENTER>
  382. <HR>
  383. </BODY></HTML>
  384.